Optimal. Leaf size=149 \[ \frac {(c f-b g) x^2}{2 c^2}+\frac {g x^4}{4 c}-\frac {\left (2 c^3 d-c^2 (b e+2 a f)-b^3 g+b c (b f+3 a g)\right ) \tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 c^3 \sqrt {b^2-4 a c}}+\frac {\left (c^2 e+b^2 g-c (b f+a g)\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1677, 1671,
648, 632, 212, 642} \begin {gather*} \frac {\log \left (a+b x^2+c x^4\right ) \left (-c (a g+b f)+b^2 g+c^2 e\right )}{4 c^3}-\frac {\tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right ) \left (-c^2 (2 a f+b e)+b c (3 a g+b f)+b^3 (-g)+2 c^3 d\right )}{2 c^3 \sqrt {b^2-4 a c}}+\frac {x^2 (c f-b g)}{2 c^2}+\frac {g x^4}{4 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 1671
Rule 1677
Rubi steps
\begin {align*} \int \frac {x \left (d+e x^2+f x^4+g x^6\right )}{a+b x^2+c x^4} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {d+e x+f x^2+g x^3}{a+b x+c x^2} \, dx,x,x^2\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \left (\frac {c f-b g}{c^2}+\frac {g x}{c}+\frac {c^2 d-a c f+a b g+\left (c^2 e+b^2 g-c (b f+a g)\right ) x}{c^2 \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )\\ &=\frac {(c f-b g) x^2}{2 c^2}+\frac {g x^4}{4 c}+\frac {\text {Subst}\left (\int \frac {c^2 d-a c f+a b g+\left (c^2 e+b^2 g-c (b f+a g)\right ) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 c^2}\\ &=\frac {(c f-b g) x^2}{2 c^2}+\frac {g x^4}{4 c}+\frac {\left (c^2 e+b^2 g-c (b f+a g)\right ) \text {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^3}+\frac {\left (2 c^3 d-c^2 (b e+2 a f)-b^3 g+b c (b f+3 a g)\right ) \text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^3}\\ &=\frac {(c f-b g) x^2}{2 c^2}+\frac {g x^4}{4 c}+\frac {\left (c^2 e+b^2 g-c (b f+a g)\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3}-\frac {\left (2 c^3 d-c^2 (b e+2 a f)-b^3 g+b c (b f+3 a g)\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c^3}\\ &=\frac {(c f-b g) x^2}{2 c^2}+\frac {g x^4}{4 c}-\frac {\left (2 c^3 d-c^2 (b e+2 a f)-b^3 g+b c (b f+3 a g)\right ) \tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 c^3 \sqrt {b^2-4 a c}}+\frac {\left (c^2 e+b^2 g-c (b f+a g)\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 142, normalized size = 0.95 \begin {gather*} \frac {2 c (c f-b g) x^2+c^2 g x^4+\frac {2 \left (2 c^3 d-c^2 (b e+2 a f)-b^3 g+b c (b f+3 a g)\right ) \tan ^{-1}\left (\frac {b+2 c x^2}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}+\left (c^2 e+b^2 g-c (b f+a g)\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 151, normalized size = 1.01
method | result | size |
default | \(-\frac {-\frac {1}{2} g \,x^{4} c +b g \,x^{2}-c \,x^{2} f}{2 c^{2}}+\frac {\frac {\left (-a c g +b^{2} g -f b c +c^{2} e \right ) \ln \left (c \,x^{4}+b \,x^{2}+a \right )}{2 c}+\frac {2 \left (a b g -a c f +c^{2} d -\frac {\left (-a c g +b^{2} g -f b c +c^{2} e \right ) b}{2 c}\right ) \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{2 c^{2}}\) | \(151\) |
risch | \(\text {Expression too large to display}\) | \(3739\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.47, size = 486, normalized size = 3.26 \begin {gather*} \left [\frac {{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} g x^{4} + 2 \, {\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} f - {\left (b^{3} c - 4 \, a b c^{2}\right )} g\right )} x^{2} + {\left (2 \, c^{3} d - b c^{2} e + {\left (b^{2} c - 2 \, a c^{2}\right )} f - {\left (b^{3} - 3 \, a b c\right )} g\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c - {\left (2 \, c x^{2} + b\right )} \sqrt {b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) + {\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e - {\left (b^{3} c - 4 \, a b c^{2}\right )} f + {\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} g\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )}}, \frac {{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} g x^{4} + 2 \, {\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} f - {\left (b^{3} c - 4 \, a b c^{2}\right )} g\right )} x^{2} - 2 \, {\left (2 \, c^{3} d - b c^{2} e + {\left (b^{2} c - 2 \, a c^{2}\right )} f - {\left (b^{3} - 3 \, a b c\right )} g\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {{\left (2 \, c x^{2} + b\right )} \sqrt {-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) + {\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e - {\left (b^{3} c - 4 \, a b c^{2}\right )} f + {\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} g\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.65, size = 146, normalized size = 0.98 \begin {gather*} \frac {c g x^{4} + 2 \, c f x^{2} - 2 \, b g x^{2}}{4 \, c^{2}} - \frac {{\left (b c f - b^{2} g + a c g - c^{2} e\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, c^{3}} + \frac {{\left (2 \, c^{3} d + b^{2} c f - 2 \, a c^{2} f - b^{3} g + 3 \, a b c g - b c^{2} e\right )} \arctan \left (\frac {2 \, c x^{2} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt {-b^{2} + 4 \, a c} c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.68, size = 1834, normalized size = 12.31 \begin {gather*} x^2\,\left (\frac {f}{2\,c}-\frac {b\,g}{2\,c^2}\right )+\frac {g\,x^4}{4\,c}-\frac {\ln \left (c\,x^4+b\,x^2+a\right )\,\left (8\,g\,a^2\,c^2-10\,g\,a\,b^2\,c+8\,f\,a\,b\,c^2-8\,e\,a\,c^3+2\,g\,b^4-2\,f\,b^3\,c+2\,e\,b^2\,c^2\right )}{2\,\left (16\,a\,c^4-4\,b^2\,c^3\right )}+\frac {\mathrm {atan}\left (\frac {2\,c^4\,\left (4\,a\,c-b^2\right )\,\left (x^2\,\left (\frac {\frac {\left (\frac {-6\,g\,b^3\,c^3+6\,f\,b^2\,c^4-6\,e\,b\,c^5+10\,a\,g\,b\,c^4+4\,d\,c^6-4\,a\,f\,c^5}{c^4}-\frac {4\,b\,c^2\,\left (8\,g\,a^2\,c^2-10\,g\,a\,b^2\,c+8\,f\,a\,b\,c^2-8\,e\,a\,c^3+2\,g\,b^4-2\,f\,b^3\,c+2\,e\,b^2\,c^2\right )}{16\,a\,c^4-4\,b^2\,c^3}\right )\,\left (-g\,b^3+f\,b^2\,c-e\,b\,c^2+3\,a\,g\,b\,c+2\,d\,c^3-2\,a\,f\,c^2\right )}{8\,c^3\,\sqrt {4\,a\,c-b^2}}-\frac {b\,\left (-g\,b^3+f\,b^2\,c-e\,b\,c^2+3\,a\,g\,b\,c+2\,d\,c^3-2\,a\,f\,c^2\right )\,\left (8\,g\,a^2\,c^2-10\,g\,a\,b^2\,c+8\,f\,a\,b\,c^2-8\,e\,a\,c^3+2\,g\,b^4-2\,f\,b^3\,c+2\,e\,b^2\,c^2\right )}{2\,c\,\sqrt {4\,a\,c-b^2}\,\left (16\,a\,c^4-4\,b^2\,c^3\right )}}{a}+\frac {b\,\left (\frac {\left (\frac {-6\,g\,b^3\,c^3+6\,f\,b^2\,c^4-6\,e\,b\,c^5+10\,a\,g\,b\,c^4+4\,d\,c^6-4\,a\,f\,c^5}{c^4}-\frac {4\,b\,c^2\,\left (8\,g\,a^2\,c^2-10\,g\,a\,b^2\,c+8\,f\,a\,b\,c^2-8\,e\,a\,c^3+2\,g\,b^4-2\,f\,b^3\,c+2\,e\,b^2\,c^2\right )}{16\,a\,c^4-4\,b^2\,c^3}\right )\,\left (8\,g\,a^2\,c^2-10\,g\,a\,b^2\,c+8\,f\,a\,b\,c^2-8\,e\,a\,c^3+2\,g\,b^4-2\,f\,b^3\,c+2\,e\,b^2\,c^2\right )}{2\,\left (16\,a\,c^4-4\,b^2\,c^3\right )}-\frac {2\,a^2\,b\,c^2\,g^2-a^2\,c^3\,f\,g-3\,a\,b^3\,c\,g^2+4\,a\,b^2\,c^2\,f\,g-3\,a\,b\,c^3\,e\,g-a\,b\,c^3\,f^2+a\,c^4\,e\,f+d\,a\,c^4\,g+b^5\,g^2-2\,b^4\,c\,f\,g+2\,b^3\,c^2\,e\,g+b^3\,c^2\,f^2-2\,b^2\,c^3\,e\,f-d\,b^2\,c^3\,g+b\,c^4\,e^2+d\,b\,c^4\,f-d\,c^5\,e}{c^4}+\frac {b\,{\left (-g\,b^3+f\,b^2\,c-e\,b\,c^2+3\,a\,g\,b\,c+2\,d\,c^3-2\,a\,f\,c^2\right )}^2}{2\,c^4\,\left (4\,a\,c-b^2\right )}\right )}{2\,a\,\sqrt {4\,a\,c-b^2}}\right )+\frac {\frac {\left (\frac {8\,g\,a^2\,c^4-8\,g\,a\,b^2\,c^3+8\,f\,a\,b\,c^4-8\,e\,a\,c^5}{c^4}-\frac {8\,a\,c^2\,\left (8\,g\,a^2\,c^2-10\,g\,a\,b^2\,c+8\,f\,a\,b\,c^2-8\,e\,a\,c^3+2\,g\,b^4-2\,f\,b^3\,c+2\,e\,b^2\,c^2\right )}{16\,a\,c^4-4\,b^2\,c^3}\right )\,\left (-g\,b^3+f\,b^2\,c-e\,b\,c^2+3\,a\,g\,b\,c+2\,d\,c^3-2\,a\,f\,c^2\right )}{8\,c^3\,\sqrt {4\,a\,c-b^2}}-\frac {a\,\left (-g\,b^3+f\,b^2\,c-e\,b\,c^2+3\,a\,g\,b\,c+2\,d\,c^3-2\,a\,f\,c^2\right )\,\left (8\,g\,a^2\,c^2-10\,g\,a\,b^2\,c+8\,f\,a\,b\,c^2-8\,e\,a\,c^3+2\,g\,b^4-2\,f\,b^3\,c+2\,e\,b^2\,c^2\right )}{c\,\sqrt {4\,a\,c-b^2}\,\left (16\,a\,c^4-4\,b^2\,c^3\right )}}{a}+\frac {b\,\left (\frac {\left (\frac {8\,g\,a^2\,c^4-8\,g\,a\,b^2\,c^3+8\,f\,a\,b\,c^4-8\,e\,a\,c^5}{c^4}-\frac {8\,a\,c^2\,\left (8\,g\,a^2\,c^2-10\,g\,a\,b^2\,c+8\,f\,a\,b\,c^2-8\,e\,a\,c^3+2\,g\,b^4-2\,f\,b^3\,c+2\,e\,b^2\,c^2\right )}{16\,a\,c^4-4\,b^2\,c^3}\right )\,\left (8\,g\,a^2\,c^2-10\,g\,a\,b^2\,c+8\,f\,a\,b\,c^2-8\,e\,a\,c^3+2\,g\,b^4-2\,f\,b^3\,c+2\,e\,b^2\,c^2\right )}{2\,\left (16\,a\,c^4-4\,b^2\,c^3\right )}-\frac {a^3\,c^2\,g^2-2\,a^2\,b^2\,c\,g^2+2\,a^2\,b\,c^2\,f\,g-2\,a^2\,c^3\,e\,g+a\,b^4\,g^2-2\,a\,b^3\,c\,f\,g+2\,a\,b^2\,c^2\,e\,g+a\,b^2\,c^2\,f^2-2\,a\,b\,c^3\,e\,f+a\,c^4\,e^2}{c^4}+\frac {a\,{\left (-g\,b^3+f\,b^2\,c-e\,b\,c^2+3\,a\,g\,b\,c+2\,d\,c^3-2\,a\,f\,c^2\right )}^2}{c^4\,\left (4\,a\,c-b^2\right )}\right )}{2\,a\,\sqrt {4\,a\,c-b^2}}\right )}{9\,a^2\,b^2\,c^2\,g^2-12\,a^2\,b\,c^3\,f\,g+4\,a^2\,c^4\,f^2-6\,a\,b^4\,c\,g^2+10\,a\,b^3\,c^2\,f\,g-6\,a\,b^2\,c^3\,e\,g-4\,a\,b^2\,c^3\,f^2+12\,a\,b\,c^4\,d\,g+4\,a\,b\,c^4\,e\,f-8\,a\,c^5\,d\,f+b^6\,g^2-2\,b^5\,c\,f\,g+2\,b^4\,c^2\,e\,g+b^4\,c^2\,f^2-4\,b^3\,c^3\,d\,g-2\,b^3\,c^3\,e\,f+4\,b^2\,c^4\,d\,f+b^2\,c^4\,e^2-4\,b\,c^5\,d\,e+4\,c^6\,d^2}\right )\,\left (-g\,b^3+f\,b^2\,c-e\,b\,c^2+3\,a\,g\,b\,c+2\,d\,c^3-2\,a\,f\,c^2\right )}{2\,c^3\,\sqrt {4\,a\,c-b^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________